<html>
<head>
<!-- Copyright (c) GoAhead Software Inc., 1995-2010. All Rights Reserved. -->
<title>websError-- GoAhead WebServer API</title>
<link rel="stylesheet" href="../../../style/doc.css" type="text/css">
</head>

<body>
<table class=apitable> <tr><td>
<TABLE border=0 width=100% cellspacing=0 cellpadding=0 CLASS="apiTitle"> <TR> 
<td class="titleLeft" align=left width="33%"><b>websError</b></TD><td class="titleCenter" align=center width="33%"><b> 
GoAhead WebServer API</b></TD><td class="titleRight" align=right width="33%"><B> 
GoAhead EMF</B></TD></TR> </TABLE><HR> <h2>Synopsis</h2><p>Return an error message 
to the requesting browser.</p><h2>Prototype</h2><pre> #include &quot;webs.h&quot;
 
 void <b>websError</b>(webs_t wp, int code, char_t *msg, ...); </pre><h2>Parameters</h2><table width=100% BORDER="0" CELLPADDING="0" CELLSPACING="0"> 
<TR> <TD VALIGN="TOP" WIDTH="5%">wp <TD WIDTH="95%"> Web server connection handle. 
<TR> <TD VALIGN="TOP" WIDTH="5%">code <TD WIDTH="95%">HTTP response code (see 
<A href="websDone.htm">websDone</A> for codes). <TR> <TD VALIGN="TOP" WIDTH="5%">msg 
<TD WIDTH="95%"> Message format string with %s and %d parameters.<tr> <td cellpadding = 20 VALIGN="TOP" WIDTH="5%">...</td><td cellpadding = 20 WIDTH="95%"> 
Parameters for %s and %d directives.</td></tr></table><h2>Description</h2><P>The 
websError procedure can be used to return a request response to the user's browser 
and then close the connection. It internally calls <STRONG><A HREF="websDone.htm">websDone</A></STRONG> 
to close the connection. You can use it as you would a printf call with a message 
format string. </P><h2>Return Value</h2><p> None.</p><h2>Example</h2><pre> websError(wp, 200, &quot;Can't open %s&quot;, filename); </pre><h2>Stability Classification</h2><p>Stable.</p><h2>See 
Also</h2><p><A href="websDone.htm">websDone</A></p></td></tr></table>
</body>
</html>
